<template>

<div>

    <ul>
          <li v-for="item in list" :key="item.id"><a :id="item.id" href="">{{item.name}}</a></li>
    </ul>

    <br>
    <br>  
    <br>
    <br>  
    <br>
    <br>  
    <br>
    <br>  
    <br>
    <br>  

    <el-input type="text" name="menu" v-model="menu"></el-input>
    <el-button type="primary" @click="addMenu">添加菜单</el-button>
</div>
 
</template>
<style lang="less" scoped>
div{
      ul{
        margin: 0;
        padding: 0;
        list-style-type: none;
        li{
          margin: 0;
          padding: 0;
          list-style-type: none;
          line-height: 30px;
          a{
            text-decoration: none;
            color: #000000;
          }
        }
      }
    }
</style>
<script>
export default {
  name:'Left',
  props:{
    list:Array
  },
  data(){
    return{      
      menu:''
    }
  },
  methods:{
    addMenu(){
      this.$emit('add',this.menu)
    }
  }
}
</script>